package com.ybkj.o2o.zhuanche.manager;

import com.ybkj.o2o.zhuanche.common.DataGrid;
import com.ybkj.o2o.zhuanche.common.query.CarTypeQuery;
import com.ybkj.o2o.zhuanche.entity.CarType;
import com.ybkj.o2o.zhuanche.entity.CarTypeDetail;
import com.ybkj.o2o.zhuanche.entity.CarTypeRel;
import com.ybkj.o2o.zhuanche.entity.ServiceType;

import java.util.List;
import java.util.Map;

public interface CarTypeManager {

  List<CarType> findAll(Long companyId, String appKey);

  CarType findByCarTypeId(Long carTypeId, String appKey);

  CarType save(CarType carType);

  void update(CarType carType);

  void deleteById(Long id, String appKey);

  DataGrid<CarType> findByParams(CarTypeQuery carTypeQuery);

  List<CarType> findByParam(CarTypeQuery carTypeQuery);

  Long countByParams(CarTypeQuery carTypeQuery);

  List<Map<String, Object>> queryCarTypes(Long companyId, String appKey);

  CarType saveCarType(CarType carType, Long tangzuAreaId, Long rizuAreaId, Long banrizuAreaId,
      Long jiejiAreaId, Long songjiAreaId, Long jiezhanAreaId, Long songzhanAreaId,
      String tangzuAreaName, String rizuAreaName, String banrizuAreaName, String jiejiAreaName,
      String songjiAreaName, String jiezhanAreaName, String songzhanAreaName, String appKey);

  void deleteCarType(Long carTypeId, String appKey);

  CarType updateCarType(Long carTypeId, String typeName, Integer sequence, String picture,
      String appKey, String ifTaxi, String accessibleType);

  List<Map<String, Object>> findByCarTypeIdV4up(Long carTypeId, Long companyId, String appKey);

  DataGrid<CarType> queryCarTypeV4up(CarTypeQuery carTypeQuery);

  List<CarTypeDetail> queryCarTypeDetail(String appKey);
  
  void initCarTypeDetail(String appKey);

  Long countByCompanyIdV4up(Long companyId, String companyName, String appKey);

  Long countByCompanyName(CarTypeQuery carTypeQuery);

  List<CarType> queryCarTypesV4up(Long companyId, String appKey);

  ServiceType queryServiceType(CarTypeQuery carTypeQuery);

  Long queryServiceTypeById(Long typeId, String appKey);

  List<CarType> findByAreaId(Long areaId, String appKey);

  void saveCarTypeRel(CarTypeRel carTypeRel);

  List<CarTypeRel> findByCarTypeRelBycarTypeId(Long carTypeId, String appKey);

  List<CarType> getCarTypeByIftaxi(String ifTaxi, String appKey);

  int updateCarTypeDetail(Long id, String photo, String priceDetail,
      String startPrice, String timePrice, String miliagePrice, String appKey);
}
